<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我的购物车列表 <{$Think.SYS_SITENAME}></title>
<link href="__PUBLIC__/css/zflc.css" type="text/css" rel="stylesheet" />
<link href="__PUBLIC__/css/top.css" type="text/css" rel="stylesheet" />
<script src="__PUBLIC__/jsLibrary/cdate_py_z_q.js"></script>
<script src="__PUBLIC__/jsLibrary/site/others.js" type="text/javascript" language="javascript"></script>
<script src="__PUBLIC__/jsLibrary/clearbox/clearbox.js" type="text/javascript"></script>
</head>
<body>
   <center>
       <{$tophtml}>
    </center>
    <!--top end-->
    <!--content start-->
    <div class="content">
        <div id="w1000">
        	<!--流程头部 start-->
            <div class="lc">
            	<ul><img src="__PUBLIC__/images/zf_gwc.jpg" /></ul>
                <ul class="lc_lb">
                	<li class="lb_bt">购物车列表</li>
                    <li class="lc_tb">
                    	<span class="num1"></span>
                        <span class="num2_gray"></span>
                        <span class="num3_gray"></span>
                        <span class="num4_gray"></span>
                    </li>
                </ul>
            </div>
            <!--流程头部end-->
            <!--操作提示 start-->
           
           <li>
                	<div align="left" style="margin-top:10px;">
                      <table width="900" border="0" cellspacing="0" cellpadding="0">
                         <tr>
                            <td width="534" height="26"><strong>商品列表</strong>：</td> <td width="104" height="26"><strong>编辑</strong></td> <td width="62" height="26"><strong>移除</strong></td>
                          </tr>
                        
                         <volist name="cart" id="vo">
                          
                          <tr>
                            <td height="26" colspan="3">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="18%" height="50" valign="top"><img height="105" width="160" src="__PUBLIC__<{$vo.propic}>" alt="<{$vo.proname}>"></td>
    <td width="58%" valign="top"><h2><a target="_blank" href="/tour/view-id-<{$vo.key|preg_replace="/[a-z]+/","",###}>"><span id="proname_tour<{$vo.proid}>"><{$vo.proname}></span></a></h2>
     <div id="showhtmlpro_tour<{$vo.proid}>">
        <div style="height:25px; margin-top:10px;">成人数：<{$vo.chengren}> , 儿童数:<{$vo.et}></div>
        <div style="height:25px;">出发时间段：<{$vo.chufashijiand}></div>
        <if condition="$vo.chufatime neq ''">        <div style="height:25px;">出发日期：<{$vo.chufatime}></div></if>
        <if condition="$vo.chufatime neq ''">        <div style="height:25px;">房间数：<{$vo.roomnum}></div></if>
        <if condition="$vo.chufatime neq ''">        <div style="height:25px;">是否愿意拼房：
        <if condition="$vo.agreedanfangcha eq 1">是<else />否</if></div></if>
         <if condition="$vo.jihedidianl neq ''">  <div style="height:25px;">您选择的集合地点：<{$vo.jihedidianl}></div></if>
         <if condition="$vo.bixuanxiang neq ''">  <div style="height:25px;">您购买的必选项目：<{$vo.bixuanxiang|preg_replace=foramtzhengc("/##^[##d##.]+$/"),"",###}></div></if>
       <if condition="$vo.jiejifuwux neq ''">  <div style="height:25px;">您购买的接机服务项目：<{$vo.jiejifuwux|preg_replace=foramtzhengc("/##^[##d##.]+$/"),"",###}></div></if>
        
        <if condition="$vo.zixuanxiangmu neq ''">  <div style="height:25px;">您购买的自选项目：
         	 <php>
        	foreach($vo['zixuanxiangmu'] as $k=>$v){
            	echo preg_replace(foramtzhengc("/##^[##d##.]+$/"),"",$v)." ";
            }
        
        </php>
        </div></if>
        
       
       <if condition="$vo.biaoxian neq ''">  <div style="height:25px;">您购买的保险项目：
         	 <php>
        	foreach($vo['biaoxian'] as $k=>$v){
            	echo preg_replace(foramtzhengc("/##^[##d##.]+$/"),"",$v)." ";
            }
        </php>
        </div></if>
    </div>
  <!--  style="display:none"-->
    <div  style="display:none" id="edithtmlpro_tour<{$vo.proid}>">
       <form action="" name="formcart_tour<{$vo.proid}>" id="formcart_tour<{$vo.proid}>">
        <div style="height:25px; margin-top:10px;">成人数：
       
        <select name="chengren_tour<{$vo.proid}>" id="chengren_tour<{$vo.proid}>">
        <for start="1" end="$vo.maxchengrennum" comparison="ELT" name="ki">
		<option  value="<{$ki}>" <if condition="$ki eq $vo['chengren']">selected="selected"</if> ><{$ki}></option>
        </for>
        </select>
        
          , 儿童数:
        
          <select id="et_tour<{$vo.proid}>" name="et_tour<{$vo.proid}>">
             <for start="0" end="20" comparison="ELT" name="ki">
            <option  value="<{$ki}>" <if condition="$ki eq $vo['et']">selected="selected"</if> ><{$ki}></option>
            </for>
           </select>
          </div>
        <div style="height:25px;">出发时间段：
        <select name="cooisepriceid_tour<{$vo.proid}>" id="cooisepriceid_tour<{$vo.proid}>">
        <option value="">请选择时间段</option>
        <Article:article  sql='select * from ".DQ."price as a left join ".DQ."classsys as b on a.price5=b.classsys0 where a.price7=".$vo["proid"]."'>
             <php>
               $temp="sjd=".date("Y-m-d",$article["price15"])."->".date("Y-m-d",$article["price16"])."&tqts=".$article["price13"];
               if($article["price5"]==1216) $temp.="&indate=".$article["price6"];
               if($article["price5"]==1215) $temp.="&zhouqi=".str_replace("周","",getTurnDtoXnum($article["price6"]));
               $syscookie["cart"]["tour".$vo["proid"]]["cfssdform"][$article["price0"]]=$temp;
             </php>
             <option  <php>
             if($article["price0"] ==$vo["cooisepriceid"]){
             	echo "selected='selected'";
            	$chufacho=$syscookie["cart"]["tour".$vo["proid"]]["cfssdform"][$article["price0"]];
                $etprice= $article["price10"];
                $chengrenprice=$article["price8"];
                $danfangcha=$article["price17"];
             }
             </php>
              value="<{$article.price0}>"><{$article.price15|date="Y-m-d",###}>至<{$article.price16|date="Y-m-d",###}>  <{$article.price1}> 成人￥<{$article.price8}>/人,儿童￥<{$article.price10}>/人,单房差￥<{$article.price17}></option> 
         </Article:article>
        </select>
        <php>setmycookies("syscookie",serialize($syscookie));</php>
       </div>
       <br>
       <div style="width:100%">请选择出发时间：<input type="text" name="chufatime_tour<{$vo.proid}>" id="chufatime_tour<{$vo.proid}>" onClick="javascript:cdate_show('chufatime_tour<{$vo.proid}>','<{$chufacho}>');" readonly="readonly" value="<{$vo.chufatime}>"></div>
       <div>房间数: <span id="selectfangjianshu_tour<{$vo.proid}>"><select name="roomnum_tour<{$vo.proid}>" id="roomnum_tour<{$vo.proid}>">
       				<php>
                    $startnum=$vo['chengren'] % 2;
                   $startnum=($startnum==1)?($vo['chengren']+1)/2:$vo['chengren']/2;
                   for($i=$startnum;$i<=$vo['chengren'];$i++){
                   	$temp2="";
                    if($vo['roomnum']==$i) $temp2="selected";
                    echo "<option value='".$i."' ".$temp2.">".$i."</option>";
                    
                    }
                  </php>
                 </select> 请注意：儿童不可以单独占房
                 </span>
                 <span id="danfangchasuoming_tour<{$vo.proid}>">
                 由于您是单人数报名,您的住宿有可能产生单房差,但您可选择愿意拼房(打勾,不用付单房差);您也可选择不愿意拼房(不打勾,需要付单房差) <br>
                 请选择<input  
                   	
                     <php>
                        if($syscookie["cart"][$vo["proid"]]["agreedanfangcha"]=="1" or !$syscookie["cart"][$vo["proid"]]["agreedanfangcha"]) echo "checked='checked'";
                    </php>
                     name="agreedanfangcha_tour<{$vo.proid}>" id="agreedanfangcha_tour<{$vo.proid}>" type="checkbox"  value="1" /><a href="/onepage/show-mid-583-did-6" rel="clearbox[width=400,height=200]">什么是单房差</a>
                 </span>
                 
                 </div>
       <br>
       
         <div style="width:100%; height:100%">
			 <Article:article  sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=560 order by info4 desc'>
            	<if condition="$key eq 0"> <strong>必选项目</strong>(行程里的必选项目):<br /></if>
                <div style="height:25px;"><input name="bixuanxiang_tour<{$vo.proid}>" <if condition="$vo['bixuanxiang'] eq  $article['info1'].'^'. $article['info8']"> checked </if>  id="bixuanxiang_tour<{$vo.proid}>" type="radio" value="<{$article.info1}>^<{$article.info8}>" /> <{$article.info1}> 单价: <{$article.info8}>元</div>
         </Article:article>   
       </div>
       
       
        <div style="width:100%; height:100%">
			 <Article:article  sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=559 order by info4 desc'>
            	<if condition="$key eq 0"> <strong>自选项目</strong>(行程里的自选项目，你可以选择多个或不选):<br /></if>
                <div style="height:25px;"><input name="zixuanxiangmu_tour<{$vo.proid}>[]" 
                	<php>
                    	foreach($vo['zixuanxiangmu'] as $zxv){
                        	if(strstr($zxv,$article['info1']."^".$article['info7'])) echo "checked='checked'";
                            
                        }
                    </php>
                      id="zixuanxiangmu_tour<{$vo.proid}>[]" type="checkbox" value="<{$article.info1}>^<{$article.info8}>" /> <{$article.info1}>(<{$article.info8}>元)</div>
         </Article:article>   
       </div>
       
       <div style="width:100%;height:100%">
			 <Article:article  sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=558 order by info4 desc'>
            	<if condition="$key eq 0"><strong>接机项目</strong>(我们提供非常舒适的接机服务，专业的司机，非常地热情):<br /></if>
                <div style="height:25px;"><input name="jiejifuwux_tour<{$vo.proid}>" <if condition="$vo['jiejifuwux'] eq  $article['info1'].'^'. $article['info8']"> checked </if>  id="jiejifuwux_tour<{$vo.proid}>" type="radio" value="<{$article.info1}>^<{$article.info8}>" /> <{$article.info1}>(<{$article.info9}>) 单价: <{$article.info8}>元</div>
             </Article:article>   
       </div>
       
       
       <div style="width:100%;height:100%">
        
			 <Article:article  sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=557 order by info4 desc'>
            	<if condition="$key eq 0"><strong>保险项目</strong>(请根据你的具体情况来购买保险):<br /></if>
                <div style="height:25px;"><input name="biaoxian_tour<{$vo.proid}>[]"   id="biaoxian_tour<{$vo.proid}>[]"
                
               			 <php>
                    	foreach($vo['biaoxian'] as $zxv){
                        	if(strstr($zxv,$article['info1']."^".$article['info8'])) echo "checked='checked'"; 
                        }
                    </php>
                
                 type="checkbox" value="<{$article.info1}>^<{$article.info8}>" /> <{$article.info1}>,<{$article.info8}>元/人 (每人购买一份)</div>
             </Article:article>   
       </div>
       
       
        <div style="width:100%;height:100%">
        
			 <Article:article  sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=550 order by info4 desc'>
            	<if condition="$key eq 0"><strong>集合地点</strong>(为了你的方便出行，我们特设了几个集合地点，你可以根据你的位置选择一个你方便的地点):<br /></if>
                <div style="height:25px;"><input name="jihedidianl_tour<{$vo.proid}>" <if condition="$vo['jihedidianl'] eq $article['info1'].','.$article['info7']"> checked </if>  id="jihedidianl_tour<{$vo.proid}>" type="radio" value="<{$article.info1}>,<{$article.info7}>" /> <{$article.info1}>,<{$article.info7}></div>
             </Article:article>   
       </div>
       
       <div>
       <br>
       <input type="submit" name="btnsave_tour<{$vo.proid}>" id="btnsave_tour<{$vo.proid}>" value="保存">  <input type="button" name="btnsaveqx_tour<{$vo.proid}>" id="btnsaveqx_tour<{$vo.proid}>" value="取消">
        
        
       </div>
       <div>
       价格:￥<span id="xprice_tour<{$vo.proid}>">0</span> <span id="suominprice_tour<{$vo.proid}>"></span>
       </div>
         <input type="hidden" name="protypeflag" id="protypeflag" value="tour<{$vo.proid}>">
         <input type="hidden" name="chufashijiand_tour<{$vo.proid}>" id="chufashijiand_tour<{$vo.proid}>" value="<{$vo.chufashijiand}>">
         <input type="hidden" name="maxchengrennum_tour<{$vo.proid}>" id="maxchengrennum_tour<{$vo.proid}>" value="<{$vo.maxchengrennum}>">
         <input type="hidden" name="chengrenprice_tour<{$vo.proid}>" id="chengrenprice_tour<{$vo.proid}>" value="<{$chengrenprice}>">
         <input type="hidden" name="etprice_tour<{$vo.proid}>" id="etprice_tour<{$vo.proid}>" value="<{$etprice}>">
         <input type="hidden" name="danfangcha_tour<{$vo.proid}>" id="danfangcha_tour<{$vo.proid}>" value="<{$danfangcha}>">
         <input type="hidden" name="proprice_tour<{$vo.proid}>" id="proprice_tour<{$vo.proid}>" value="0">
         <input type="hidden" name="priceshuoming_tour<{$vo.proid}>" id="priceshuoming_tour<{$vo.proid}>" value="<{$vo.priceshuoming}>">
       </form>
    </div>
    
    </td>
    <td width="24%" valign="top"><div><input type="button" name="editpro_tour<{$vo.proid}>" id="editpro_tour<{$vo.proid}>" value="编辑">  <input type="button" name="delacrtpro_tour<{$vo.proid}>" id="delacrtpro_tour<{$vo.proid}>" value="移除"></div></td>
  </tr>
</table>

 </td>
</tr>
<tr><td height="30" colspan="3"><hr size="1" width="97%" align="center"></td></tr>
                         </volist>
                    </table>
				<div id="ddd" style="height:30px;">总价:￥<span id="totalprice">0</span>元</div>
                   
                   <img src="__PUBLIC__/images/next.gif" id="gotonext" style="cursor:pointer">
                    </div>
                </li>
            <div class="czts">
            	
            </div>
           
            <!--操作提示end-->
        </div>
    </div>
    
<script language="javascript">
$(document).ready(function(){
			$("input[id^='editpro']").bind("click",function(){
				id=$(this).attr("id");
			});
			
			$("select[id^='cooisepriceid_']").bind("change",function(){
				id=$(this).attr("id");
				id=id.replace("cooisepriceid_","");
				temp=$(this).val();
				$.ajax({
						  url: "/base/ajaxgetcookie-c1-cart-c2-"+id+"-c3-cfssdform-c4-"+temp,
						  cache: false,
						  success: function(html){
							$("#chufatime_"+id).attr("onclick","javascript:cdate_show('chufatime_"+id+"','"+html+"');");
					   }
				});
				$("#chufashijiand_"+id).val($(this).find("option:selected").text());
				$("#chufatime_"+id).val("");//每次重新选择日期的时候把出发时候值清空
				cdate_hide();
			});

			//绑定购物车的编辑显示编辑选项功能
			$("input[id^='editpro_']").bind("click",function(){
				
				id=$(this).attr("id");
				id=id.replace("editpro_","");
				$("#showhtmlpro_"+id).hide();
				$("#edithtmlpro_"+id).show("slow");
				$("#formcart_tour").attr("action","/pay/editcart");
			});
			

			//为每个编辑时取消编辑绑定事件
			$("input[id^='btnsaveqx_']").bind("click", function(){
				id=$(this).attr("id");
				id=id.replace("btnsaveqx_","");
				$("#showhtmlpro_"+id).fadeIn("slow");
				$("#edithtmlpro_"+id).hide();
			});
			
			//从购物车里删除一个商品的功能
			$("input[id^='delacrtpro_']").bind("click", function(){
				
				id=$(this).attr("id");
				id=id.replace("delacrtpro_","");
				if (confirm("真的要删除吗？")){
				   $("#formcart_"+id).attr("action","/pay/delcart");
				  $("#formcart_"+id).submit();
			    }
						
			});
			
			//绑定修改单个商品的功能
			$("input[id^='btnsave_']").bind("click",function(){
				id=$(this).attr("id");
				id=id.replace("btnsave_","");
				
				//验证填写的值
				t1=$("#chengren_"+id).val();
				t2=$("#maxchengrennum_"+id).val();
				if( parseInt(t1)>parseInt(t2) ){
					alert("成人数最大不能超过"+t1+"个数"+t2);
					$("#maxchengrennum_"+id).focus();
					return false;	
				}
				
				chufatime=$("#chufatime_"+id).val();
				if(!chufatime.match(/^[\d]{4}\-[\d]{2}\-[\d]{2}/)){
					alert("出发时间不正确");
					$("#chufatime_"+id).focus();
					return false;	
				}
				
				$("#formcart_"+id).attr("action","/pay/editcart");
				$("#formcart_"+id).submit();
			});
			
			
			//当选择不同的成人数时，显示相应的可选的房间类型
			$("select[id^='chengren_']").bind("change",function(){
				id=$(this).attr("id");
				id=id.replace("chengren_","");
				chengren=parseInt($(this).val());
				
			    flag=chengren % 2;
				
				if(flag==1){
					startnum=(chengren+1)/2;
				}else{
					startnum=(chengren)/2;
				}
				$("#roomnum_"+id).empty();
					for(i=startnum;i<=chengren;i++){
						$("#roomnum_"+id).append("<option value='"+i+"'>"+i+"</option>");
					}
					
					
				v=$(this).val();
				
				if($("#agreedanfangcha_"+id).attr("checked")=="checked")
				{
					
					if(parseInt(v) % 2 ==1){
						$("#selectfangjianshu_"+id).hide();
						$("#danfangchasuoming_"+id).show();	
					}
				}
				if(parseInt(v) % 2 ==0){
						$("#selectfangjianshu_"+id).show();
						$("#danfangchasuoming_"+id).hide();	
				}
				
				//把儿童数设为0,让客人重新选择
				$("#et_"+id).val(0);
				
				getxprice(id);	
					
			});
			
			//绑定是否同意单房价
			$("input[id^='agreedanfangcha_']").bind("click",function(){
				v=$(this).val();
				id=$(this).attr("id");
				id=id.replace("agreedanfangcha_","");
				if($(this).attr("checked")!="checked"){
					$("#selectfangjianshu_"+id).show();
					$("#danfangchasuoming_"+id).hide();		
				}
				
			});
			
		//当选择了不同的房间数时，更新价格
		$("select[id^='roomnum_']").bind("change",function(){
			id=$(this).attr("id");
			id=id.replace("roomnum_","");
			getxprice(id);
		});
			
	  //==================================组长定儿童人数选择，并更新价格
	  $("select[id^='et_']").bind("change",function(){
		   id=$(this).attr("id");
			id=id.replace("et_","");
			vet=$(this).val();
			vcr=$("#chengren_"+id).val();
			if(parseInt(vcr)*2<parseInt(vet)){
				alert("你的团队最多带"+parseInt(vcr)*2);
				$(this).val(parseInt(vcr)*2);
			}
			getxprice(id);
	  });
	  
	  
	  //============================================为下一步检查数据和合法性
	  $("#gotonext").bind("click",function(){
		 //检查成人数是否为空
		 window.cflag=true;
		 $("select[id^='chengren_']").each(function(){
			v=$(this).val();
			if(v==""){
				id=$(this).attr("id");
				id=id.replace("chengren_","");
				alert("【"+$("#proname_"+id).html()+"】的人数不能为空");
				 window.cflag=false;
				$("#editpro_"+id).click();
				return false;	
			}
		 });
		 
		 //检查是否选择了出发时间段
		 $("select[id^='cooisepriceid_']").each(function(){
			v=$(this).val();
			if(v==""){
				id=$(this).attr("id");
				id=id.replace("cooisepriceid_","");
				alert("【"+$("#proname_"+id).html()+"】的出发时间段不能为空");
				window.cflag=false;
				$("#editpro_"+id).click();
				return false;	
			}
		 });
		 
		 //检查是否选择了出发时间
		 $("input[id^='chufatime_']").each(function(){
			v=$(this).val();
			if(v==""){
				id=$(this).attr("id");
				id=id.replace("chufatime_","");
				alert("【"+$("#proname_"+id).html()+"】的具体出发时间没有选择");
				window.cflag=false;
				$("#editpro_"+id).click();
				return false;	
			}
		 });
	
		if(window.cflag==false){
			return false;	
		}
		else{
			window.location.href="/pay/paytwo";
		}
	
	  });
	  
	  //=================绑定一些点击事件
	  //必选项目
	  if($("input[id^='bixuanxiang_']").length>0){
		 $("input:radio[id^='bixuanxiang_']").bind("click",function(){
			  id=$(this).attr("id");
			  id=id.replace("bixuanxiang_","");
			  getxprice(id);
			})
	  }
	  //自选项目 
	  if($("input[id^='zixuanxiangmu_']").length>0){
		 $("input[id^='zixuanxiangmu_']").bind("click",function(){
			  id=$(this).attr("id");
			  id=id.replace("zixuanxiangmu_","");
			   id=id.replace("[]","");
			  getxprice(id);
			})
	  }
	  //接机项目  
	   if($("input[id^='jiejifuwux_']").length>0){
		 $("input[id^='jiejifuwux_']").bind("click",function(){
			  id=$(this).attr("id");
			  id=id.replace("jiejifuwux_","");
			  getxprice(id);
			})
	  }
	  
	  //保险项目  biaoxian
	  if($("input[id^='biaoxian_']").length>0){
		 $("input[id^='biaoxian_']").bind("click",function(){
			  id=$(this).attr("id");
			  id=id.replace("biaoxian_","");
			  id=id.replace("[]","");
			  getxprice(id);
			})
	  }
	  
	  
	  
	  
	  
	  //初始化兑换积分信息
	  
	  
	  
	  
	
	//=====================初始化页面
	$("input[id^='editpro_']").each(function(){
		id=$(this).attr("id");
		id=id.replace("editpro_","");
		getxprice(id);
	});
	


});
	
	
	//计算每个商品的价格
	function getxprice(id)
	{
		if(id!=""){
			chengren=$("#chengren_"+id).val();//成人数
			et=$("#et_"+id).val();//儿童数
			roomnum=$("#roomnum_"+id).val();//房间数
			chengrenprice=$("#chengrenprice_"+id).val();//成人价
			erprice=$("#etprice_"+id).val();//儿童价
			agreedanfangcha=$("#agreedanfangcha_"+id).attr("checked");//是否同意了单房差
			danfangcha=$("#danfangcha_"+id).val();//单房差价
			suominprice="成人"+chengren+"* "+chengrenprice+"元/人 + 儿童"+et+" * "+erprice+"元/人";
			
			price=parseInt(chengren)*parseInt(chengrenprice)+parseInt(et)*parseInt(erprice);
			
			//当同意了拼房时,把单房差价加上去
			if(agreedanfangcha!="checked"){
				temp=(parseInt(roomnum)*2 -chengren)
				price=price+temp*parseInt(danfangcha);
				suominprice+="单房差"+temp+"个 * "+danfangcha+"元";
			}
			
			//===========================计算附属项目价格
			
			//计算必选项目价格
			if($("#bixuanxiang_"+id).length>0){
				
				$("input[id^='bixuanxiang_"+id+"']:checked").each(function(){
					bixuanxiang=$(this).val();
					bixuanxiang_price=bixuanxiang.match(/[\d\.]+$/);
					price=price+parseInt(bixuanxiang_price);
					
					suominprice+=" + "+bixuanxiang.replace("^"+bixuanxiang_price,"")+":"+bixuanxiang_price+"元";
				});
			}
			
			//计算自选项目价格
			if($("input[id^='zixuanxiangmu_"+id+"']").length>0){
				$("input[id^='zixuanxiangmu_"+id+"']:checked").each(function(){
						temp=$(this).val();
						temp_price=temp.match(/[\d\.]+$/);
						price=price+parseInt(temp_price);//更新总价
						suominprice+=" + "+temp.replace("^"+temp_price,"")+":"+temp_price+"元";//更新价格提示
				});
			}
			
			//计算保险项目价格
			if($("input[id^='biaoxian_"+id+"']").length>0){
				$("input[id^='biaoxian_"+id+"']:checked").each(function(){
						temp=$(this).val();
						temp_price=temp.match(/[\d\.]+$/);
						T=(parseInt(chengren)+parseInt(et))*parseInt(temp_price)
						price=price+T;//更新总价
						suominprice+=" + "+temp.replace("^"+temp_price,"")+"("+chengren+"+"+et+"):"+T+"元";//更新价格提示
				});
			}
			
			
			//接机服务项目价格
			if($("#jiejifuwux_"+id).length>0){
				$("input[id^='jiejifuwux_"+id+"']:checked").each(function(){
					jiejifuwux=$(this).val();
					jiejifuwux_price=jiejifuwux.match(/[\d\.]+$/);
					price=price+parseInt(jiejifuwux_price);
					suominprice+=" + "+jiejifuwux.replace("^"+jiejifuwux_price,"")+":"+jiejifuwux_price+"元";
				});
			}
			
			
			
			//更新价格的显示
			$("#xprice_"+id).html(price)
			$("#proprice_"+id).val(price);
			$("#suominprice_"+id).html("价格详细:"+suominprice);
			$("#priceshuoming_"+id).val($("#suominprice_"+id).html());
		}
		
		////更新显示总价
		$("#totalprice").html("0");
		$("input[id^='proprice_']").each(function(){
			vt=$("#totalprice").html();
			v=$(this).val();
			$("#totalprice").html(parseInt(vt)+parseInt(v));
		});
		
	}

	</script>
    
    
</body>
</html>
